#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int Sn(int a)
{
	return a + a * 11 + a * 111 + a * 1111 + a * 11111;
}

int main()
{
	int a;
	scanf("%d", &a);
	printf("Sn=%d\n", Sn(a));

	return 0;
}